<div class="divupdate">
    <div class="notice" style="display: none"></div>        
    <form id="resource_param_add_form">
    <table class="striped">
        <thead>
        <th colspan="6">
            <h4>Resource Parameter</h4>
        </th>
        </thead>
        <tbody>
            <tr>
                <td><label for="name">Name</label></td>
                <td>
                    <input id="id" name="id" type="hidden" value="<?php echo (isset($this->data) ? $this->data['parID'] : '');?>"/>
                    <input id="resid" name="resid" type="hidden" value="<?php echo $this->resource_id; ?>"/>
                    <input id="name" name="name" type="text" value="<?php echo (isset($this->data) ? $this->data['name'] : '');?>" placeholder="parameter name"/>
                </td>
                    </tr>
                <tr>
                    <td><label for="name">Value</label></td>
                    <td>
                        <input id="value" name="value" type="text" value="<?php echo (isset($this->data) ? $this->data['value'] : '');?>" placeholder="value"/>
                    </td>
                        </tr>
                    
                    <tr>
                        <td><label for="mandatory">Mandatory</label></td>
                        <td><select id="mandatory" name="mandatory" style="width: 100px">                                
                            <?php foreach ($this->mandatory as $value) {
                                    echo $value;
                                } ?>
                            </select>
                            </td>
                            </tr >
                        <tr>
                            <td valign="top"><label for="desc">Description</label></td>
                            <td><textarea id="desc" name="desc" cols="80" placeholder="Description"><?php echo (isset($this->data) ? $this->data['description'] : '');?></textarea></td>
                        </tr>               
                <tr>
                <td><label for="name">Example </label></td>
                <td><input id="example" name="example" type="text" value="<?php echo (isset($this->data) ? $this->data['example'] : '');?>" placeholder="example"/></td>
            </tr>
        <tr>
            <td colspan="2">
                <button id="save-btn" class="green" onclick="Web.Do({formid: '#resource_param_add_form', param: {type: 'save', id: <?php echo $this->resource_id ?>}});"> Save </button> &nbsp; 
                <button id="cancel-btn" onclick="Web.Do({formid: '#resource_param_add_form', param: {type: 'cancel', id: <?php echo $this->resource_id ?>}});"> Cancel </button>
            </td>
        </tr>
        </tbody>
        <tfoot>

        </tfoot>
    </table>  
    </form>
</div>